package com.tanhua.admin.service;

import com.tanhua.admin.mapper.LogMapper;
import com.tanhua.model.db.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class LogService {

    @Autowired
    private LogMapper logMapper;

    /**
     * 添加log日志
     * @param pojo
     */
    public void add(Log pojo) {
        pojo.setCreated(new Date());
        logMapper.insert(pojo);
    }
}